# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1323+1.1123.24.10 -> 1.1324 # arch/i386/kernel/process.c 1.51.1.3 -> 1.55 # include/asm-i386/agp.h 1.1.1.1 -> 1.4 # kernel/ksyms.c 1.203.1.13 -> 1.210 # include/linux/mm.h 1.121.1.7 -> 1.125 # include/asm-sparc/unistd.h 1.20.1.4 -> 1.24 # include/linux/sched.h 1.151.1.11 -> 1.160 # kernel/fork.c 1.124.1.13 -> 1.130 # kernel/sys.c 1.43.1.10 -> 1.49 # include/asm-sparc64/unistd.h 1.19.1.4 -> 1.23 # arch/i386/kernel/traps.c 1.52.1.4 -> 1.56 # arch/i386/kernel/Makefile 1.44.1.4 -> 1.48 # kernel/softirq.c 1.39.1.5 -> 1.43 # drivers/char/drm/i810_dma.c 1.26.1.3 -> 1.30 # drivers/media/video/Makefile 1.18.1.3 -> 1.22 # drivers/acpi/tables.c 1.14.1.1 -> 1.16 # include/linux/pci_ids.h 1.103.1.13 -> 1.109 # include/linux/irq.h 1.6.1.3 -> 1.12 # arch/ppc64/kernel/irq.c 1.30.1.1 -> 1.32 # drivers/acpi/pci_irq.c 1.21 -> 1.22 # mm/memory.c 1.130 -> 1.131 # arch/ppc64/kernel/setup.c 1.28.1.2 -> 1.31 # include/linux/sunrpc/svc.h 1.20.1.5 -> 1.26 # include/linux/sysctl.h 1.47.1.3 -> 1.50 # arch/ppc64/kernel/xics.c 1.25.1.1 -> 1.27 # drivers/net/tg3.c 1.72.1.10 -> 1.77 # include/linux/smp.h 1.22.1.4 -> 1.25 # arch/ppc64/kernel/htab.c 1.34.1.1 -> 1.36 # arch/ppc64/kernel/open_pic.c 1.15.1.1 -> 1.17 # arch/ppc64/mm/init.c 1.46.1.4 -> 1.52 # include/asm-i386/unistd.h 1.25.1.4 -> 1.30 # Makefile 1.410.1.11 -> 1.419 # include/asm-x86_64/unistd.h 1.18 -> 1.19 # drivers/char/agp/backend.c 1.83.1.1 -> 1.85 # arch/ppc64/kernel/prom.c 1.28.1.3 -> 1.33 # kernel/module.c 1.86.1.5 -> 1.91 # arch/ppc64/kernel/smp.c 1.40.1.1 -> 1.42 # arch/ppc64/kernel/pacaData.c 1.7.1.1 -> 1.10 # mm/slab.c 1.93.1.4 -> 1.98 # kernel/sched.c 1.193.1.14 -> 1.201 # drivers/acpi/osl.c 1.37.1.5 -> 1.43 # kernel/timer.c 1.65 -> 1.66 # drivers/char/drm/gamma_dma.c 1.12.1.3 -> 1.15 # arch/ppc64/kernel/Makefile 1.27.1.1 -> 1.30 # include/asm-i386/hw_irq.h 1.21.1.3 -> 1.26 # drivers/scsi/qla1280.c 1.38.1.6 -> 1.41 # arch/ppc64/kernel/ioctl32.c 1.35.1.1 -> 1.37 # drivers/scsi/sym53c8xx_2/sym_glue.c 1.23.1.9 -> 1.27 # diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c --- a/drivers/acpi/pci_irq.c Fri Aug 22 00:53:26 2003 +++ b/drivers/acpi/pci_irq.c Fri Aug 22 00:53:26 2003 @@ -254,7 +254,7 @@ } if (!entry->irq && entry->link.handle) { - entry->irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index); + entry->irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, NULL, NULL); if (!entry->irq) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid IRQ link routing entry\n")); return_VALUE(0); @@ -398,7 +398,9 @@ } /* Make sure all link devices have a valid IRQ. */ - acpi_pci_link_check(); + if (acpi_pci_link_check()) { + return_VALUE(-ENODEV); + } #ifdef CONFIG_X86_IO_APIC /* Program IOAPICs using data from PRT entries. */ diff -Nru a/drivers/acpi/tables.c b/drivers/acpi/tables.c --- a/drivers/acpi/tables.c Fri Aug 22 00:53:26 2003 +++ b/drivers/acpi/tables.c Fri Aug 22 00:53:26 2003 @@ -261,10 +261,17 @@ /* Map the DSDT header via the pointer in the FADT */ if (id == ACPI_DSDT) { - struct acpi_table_fadt *fadt = (struct acpi_table_fadt *) *header; + struct fadt_descriptor_rev2 *fadt = (struct fadt_descriptor_rev2 *) *header; + + if (fadt->header.revision == 3 && fadt->Xdsdt) { + *header = (void *) __acpi_map_table(fadt->Xdsdt, + sizeof(struct acpi_table_header)); + } else if (fadt->V1_dsdt) { + *header = (void *) __acpi_map_table(fadt->V1_dsdt, + sizeof(struct acpi_table_header)); + } else + *header = 0; - *header = (void *) __acpi_map_table(fadt->dsdt_addr, - sizeof(struct acpi_table_header)); if (!*header) { printk(KERN_WARNING PREFIX "Unable to map DSDT\n"); return -ENODEV; diff -Nru a/drivers/media/video/Makefile b/drivers/media/video/Makefile --- a/drivers/media/video/Makefile Fri Aug 22 00:53:26 2003 +++ b/drivers/media/video/Makefile Fri Aug 22 00:53:26 2003 @@ -7,6 +7,7 @@ zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o zr36067-objs := zoran_procfs.o zoran_device.o \ zoran_driver.o zoran_card.o +obj-y := dummy.o obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o diff -Nru a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h --- a/include/asm-x86_64/unistd.h Fri Aug 22 00:53:26 2003 +++ b/include/asm-x86_64/unistd.h Fri Aug 22 00:53:26 2003 @@ -461,7 +461,7 @@ #define __NR_tkill 200 __SYSCALL(__NR_tkill, sys_tkill) #define __NR_time 201 -__SYSCALL(__NR_time, sys_time) +__SYSCALL(__NR_time, sys_time64) #define __NR_futex 202 __SYSCALL(__NR_futex, sys_futex) #define __NR_sched_setaffinity 203 diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h --- a/include/linux/sysctl.h Fri Aug 22 00:53:26 2003 +++ b/include/linux/sysctl.h Fri Aug 22 00:53:26 2003 @@ -127,6 +127,7 @@ KERN_PANIC_ON_OOPS=57, /* int: whether we will panic on an oops */ KERN_HPPA_PWRSW=58, /* int: hppa soft-power enable */ KERN_HPPA_UNALIGNED=59, /* int: hppa unaligned-trap enable */ + KERN_CACHEDECAYTICKS=60,/* ulong: value for cache_decay_ticks (EXPERIMENTAL!) */ }; diff -Nru a/kernel/timer.c b/kernel/timer.c --- a/kernel/timer.c Fri Aug 22 00:53:26 2003 +++ b/kernel/timer.c Fri Aug 22 00:53:26 2003 @@ -144,34 +144,67 @@ list_add_tail(&timer->entry, vec); } -/*** - * add_timer - start a timer - * @timer: the timer to be added - * - * The kernel will do a ->function(->data) callback from the - * timer interrupt at the ->expired point in the future. The - * current time is 'jiffies'. - * - * The timer's ->expired, ->function (and if the handler uses it, ->data) - * fields must be set prior calling this function. - * - * Timers with an ->expired field in the past will be executed in the next - * timer tick. It's illegal to add an already pending timer. - */ -void add_timer(struct timer_list *timer) +int __mod_timer(struct timer_list *timer, unsigned long expires) { - tvec_base_t *base = &get_cpu_var(tvec_bases); - unsigned long flags; - - BUG_ON(timer_pending(timer) || !timer->function); + tvec_base_t *old_base, *new_base; + unsigned long flags; + int ret = 0; + + BUG_ON(!timer->function); check_timer(timer); - spin_lock_irqsave(&base->lock, flags); - internal_add_timer(base, timer); - timer->base = base; - spin_unlock_irqrestore(&base->lock, flags); - put_cpu_var(tvec_bases); + spin_lock_irqsave(&timer->lock, flags); + new_base = &__get_cpu_var(tvec_bases); +repeat: + old_base = timer->base; + + /* + * Prevent deadlocks via ordering by old_base < new_base. + */ + if (old_base && (new_base != old_base)) { + if (old_base < new_base) { + spin_lock(&new_base->lock); + spin_lock(&old_base->lock); + } else { + spin_lock(&old_base->lock); + spin_lock(&new_base->lock); + } + /* + * The timer base might have been cancelled while we were + * trying to take the lock(s): + */ + if (timer->base != old_base) { + spin_unlock(&new_base->lock); + spin_unlock(&old_base->lock); + goto repeat; + } + } else { + spin_lock(&new_base->lock); + if (timer->base != old_base) { + spin_unlock(&new_base->lock); + goto repeat; + } + } + + /* + * Delete the previous timeout (if there was any), and install + * the new one: + */ + if (old_base) { + list_del(&timer->entry); + ret = 1; + } + timer->expires = expires; + internal_add_timer(new_base, timer); + timer->base = new_base; + + if (old_base && (new_base != old_base)) + spin_unlock(&old_base->lock); + spin_unlock(&new_base->lock); + spin_unlock_irqrestore(&timer->lock, flags); + + return ret; } /*** @@ -179,7 +212,7 @@ * @timer: the timer to be added * @cpu: the CPU to start it on * - * This is not very scalable on SMP. + * This is not very scalable on SMP. Double adds are not possible. */ void add_timer_on(struct timer_list *timer, int cpu) { @@ -217,10 +250,6 @@ */ int mod_timer(struct timer_list *timer, unsigned long expires) { - tvec_base_t *old_base, *new_base; - unsigned long flags; - int ret = 0; - BUG_ON(!timer->function); check_timer(timer); @@ -233,52 +262,7 @@ if (timer->expires == expires && timer_pending(timer)) return 1; - spin_lock_irqsave(&timer->lock, flags); - new_base = &__get_cpu_var(tvec_bases); -repeat: - old_base = timer->base; - - /* - * Prevent deadlocks via ordering by old_base < new_base. - */ - if (old_base && (new_base != old_base)) { - if (old_base < new_base) { - spin_lock(&new_base->lock); - spin_lock(&old_base->lock); - } else { - spin_lock(&old_base->lock); - spin_lock(&new_base->lock); - } - /* - * The timer base might have been cancelled while we were - * trying to take the lock(s): - */ - if (timer->base != old_base) { - spin_unlock(&new_base->lock); - spin_unlock(&old_base->lock); - goto repeat; - } - } else - spin_lock(&new_base->lock); - - /* - * Delete the previous timeout (if there was any), and install - * the new one: - */ - if (old_base) { - list_del(&timer->entry); - ret = 1; - } - timer->expires = expires; - internal_add_timer(new_base, timer); - timer->base = new_base; - - if (old_base && (new_base != old_base)) - spin_unlock(&old_base->lock); - spin_unlock(&new_base->lock); - spin_unlock_irqrestore(&timer->lock, flags); - - return ret; + return __mod_timer(timer, expires); } /*** @@ -605,6 +589,15 @@ time_adj -= (-time_adj >> 2) + (-time_adj >> 5); else time_adj += (time_adj >> 2) + (time_adj >> 5); +#endif +#if HZ == 1000 + /* Compensate for (HZ==1000) != (1 << SHIFT_HZ). + * Add 1.5625% and 0.78125% to get 1023.4375; => only 0.05% error (p. 14) + */ + if (time_adj < 0) + time_adj -= (-time_adj >> 6) + (-time_adj >> 7); + else + time_adj += (time_adj >> 6) + (time_adj >> 7); #endif } diff -Nru a/mm/memory.c b/mm/memory.c --- a/mm/memory.c Fri Aug 22 00:53:26 2003 +++ b/mm/memory.c Fri Aug 22 00:53:26 2003 @@ -648,8 +648,12 @@ if (pte_present(pte)) { if (!write || (pte_write(pte) && pte_dirty(pte))) { pfn = pte_pfn(pte); - if (pfn_valid(pfn)) - return pfn_to_page(pfn); + if (pfn_valid(pfn)) { + struct page *page = pfn_to_page(pfn); + + mark_page_accessed(page); + return page; + } } }